package com.etc.utils;/*
 * 文件名：com.etc.utils
 * 描述：
 * 作者：蒋丽娟
 * 时间：2019/5/30 11:10
 */

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2016092800618289";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCCV+pYMhG2eiLLYgGvxLQcFi5fS+NBX9Dc5iw2FEauv0ZCuugsbZtCFTPo90bfSJE0odP70plzKKIQZOc7EXA9WK8/YuKCRBWuZkqhXfAq4QcinS3vM0Wp1dUQ47ITw15WZf67F4ZkEuCjyaNjmxdgK/I7ISUvCk9w0OH+mCTAIcvOEn7Xywy0VRn8aIjWUxt3RggIAr4TN/rUBCso0gp5WZARrwRLIs+8Smyb5dFh6WRbK7rMES8IfJMRI1LreHLpzmEZMTtbx8esENmjSVKjF2Nsvl5Z0Ut1uQrJWq1FjJsefhGfdh+Y38Tz0aW2Lai+iMFVSRBc402oK3er+fWFAgMBAAECggEAXCbH2b7cYwSKoPwTcS9CnzDXbCx86PVS9zoMO9et+VHl3LvD9dUwFVJkNurMQoRNlMZs1vcX4iDyI2ETUeGMVvLiQ5An0C1OntRXIysE52vc3Y3+scSwFdjGIIC6n9paUf8eTyvcqdfm1iVyzLMTnby0LzXJ0i4Z6ArmHFd4dBTudOZPrI/EvqY2KUDXg2C18LEmE4r6Wje5BoDlxAprfmZ4aJyRLp/VmUsVvq1+J27EkJuk+uI65m4XGrTrpo+6/qhAZ0cdNHNWm3uSGprHHk+sc5WjTr3nSSJL9/a8XGcqLu1PW3RHqYPU1n47p1FhyHomB3cir06Zj84BNrvjQQKBgQC2rY+l8xD3hxUBjOGG9LcOAiS5Ar5e4BzsLLxLb3/ytNofXGRzbB5U/ZLahO2NcBVMfs/31sgpV7vTa7A8bowkun8gE5KFR+uaSLAVa6ceDQuB8pg+niksL5ZmUMYi7U5tN6ccKYnciPzLn/gWqjJ/p517QhJ+r0c2Xn7Fibb4PQKBgQC2qOZGFjOjhexGc58XsXOZ/06OFIsuoJzePcNH9Ix5P3bzAZOTYk90L5z6Z6md1Tm4z3YyJ0UIx+XKnV8pkEDXho4aB0TkfabVBriYg0dGXCDAGTz4iS8Lgq6CgybBPzHYEwVsYPDJT+RlwBSktSo9RJnXjZZzaMKHogjN/5R+6QKBgBZOvYLzWrgPa9ZDoOq9CXmRc3CQUDT/wyhoEhpYJFS8FwLLYozhwBZ63KsInoWuETvFJJpMRScfSpV3yg6nJT/68jk1iqfx72hoxe/ntIGr8CLPQB4tbDO0H/agmIF9Xx1hNWvv+qDOragkAcSqxf3mtwltORr1RonyIiL3PTu1AoGANc16Rpqziy8fcYENE4WJb4rsMJ2Mgad9jVjT9JXr6qru9pU4SuliTe7YZkmyhHMSFYXGYu9+Ph/jZ9MC/NMoxlMz+Ca7/DGmuojIRuQkUm1AmFTWyL5fxRwxGvBWsgVTQToZFttXEXUe6XmymvFiB7n1NrDV6BirdBgeT89AhkECgYB83cpWnVZcWR1NGII7hmMccPc0L8uuumgLooAhSp5roocknpxK5nxWBRZYnyquPhe841vhDGTPdlmXMZYa3E1FSysTA0BITF62V46F80JBjXmIg1dxAnbDU/WZL1eMC/e8YcVeBvXgkdTQ/RxwFXpBO5DGIFSQAgKTJ3dpWKfqzA==";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAglfqWDIRtnoiy2IBr8S0HBYuX0vjQV/Q3OYsNhRGrr9GQrroLG2bQhUz6PdG30iRNKHT+9KZcyiiEGTnOxFwPVivP2LigkQVrmZKoV3wKuEHIp0t7zNFqdXVEOOyE8NeVmX+uxeGZBLgo8mjY5sXYCvyOyElLwpPcNDh/pgkwCHLzhJ+18sMtFUZ/GiI1lMbd0YICAK+Ezf61AQrKNIKeVmQEa8ESyLPvEpsm+XRYelkWyu6zBEvCHyTESNS63hy6c5hGTE7W8fHrBDZo0lSoxdjbL5eWdFLdbkKyVqtRYybHn4Rn3YfmN/E89Glti2ovojBVUkQXONNqCt3q/n1hQIDAQAB";

    //服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://192.168.11.202:8080/supermarket/index.jsp";
    //public static String notify_url = "/supermarket/index.jsp";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://192.168.11.202:8080/user.action/home";
   // public static String return_url = "/supermarket/return_url.jsp";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关https://openapi.alipaydev.com/gateway.do
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";



    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
